export const baseURL = import.meta.env.VITE_APP_BASE_URL
export const apiURL = import.meta.env.VITE_API_URL
export const staticURL = import.meta.env.VITE_STATIC_URL

export const uploadURL = apiURL+'/coffee/uploader';

export const tablePagination = {
    position: ['bottomCenter'],
    size: 'middle',
    showSizeChanger: true,
    showTotal: (total: number) => `共 ${total} 条`,
    defaultCurrent: 1,
    defaultPageSize: 10,
}
export const simplePagination = {
    pageSize: 10,
    size: 'small',
    showTotal: (total: number) => `共 ${total} 条`
}
export const formCol = {
    labelCol:{
        span:5
    },
    wrapperCol:{
        span:17
    }
}
export const width:Record<SizeType, {width:string}> = {
    xs: {width:'80px'},
    sm: {width:'120px'},
    md: {width:'160px'},
    lg: {width:'240px'},
    xl: {width:'320px'},
    xxl: {width:'480px'}
}
export const roles = [
    {
        label:'超级管理员',
        value:'admin'
    },
    {
        label:'专家管理员',
        value:'expert'

    },
    {
        label:'普通管理员',
        value:'user'
    }
]

export const getRoleName  = (value:'admin'|'user')=>{
    //获取角色名称
    return roles.find(item => item.value === value)?.label
}